<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
      th:replace="fragments/layout(title='从业人员信息-新增',jsPaths='/static/js/baseinfo/employee/add.js')">
<div class="right" th:fragment="right">
    <!--面包屑-->
    <div class="breadcrumb layui-bg-gray">
                <span class="layui-breadcrumb" lay-separator=">">
                    <a th:href="@{/}">首页</a>
                    <a href="">人事管理</a>
                    <a href="/employee">从业人员</a>
                    <a><cite>新增</cite></a>
                </span>
    </div>
    <!--主体内容区-->
    <div class="form-content layui-container">

        <form class="layui-form">
            <div class="layui-row">
                <div class="layui-col-md8">
                    <div class="layui-row">
                        <div class="layui-col-md6">
                            <div class="layui-form-item">
                                <label class="layui-form-label must">姓名</label>
                                <div class="layui-input-block">
                                    <input type="text" name="name" lay-verify="required" maxlength="10"
                                           placeholder="请输入姓名"
                                           autocomplete="off" class="layui-input">
                                </div>
                            </div>
                        </div>
                        <div class="layui-col-md6">
                            <div class="layui-form-item">
                                <label class="layui-form-label must">身份证号</label>
                                <div class="layui-input-block">
                                    <input type="text" name="idNo" id="idNo" lay-verify="identity" placeholder="请输入身份证号码" autocomplete="off" class="layui-input">
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="layui-row">
                        <div class="layui-col-md6">
                            <div class="layui-form-item">
                                <label class="layui-form-label must">性别</label>
                                <div class="layui-input-block">
                                    <select name="gender">
                                        <option value="0">男</option>
                                        <option value="1">女</option>
                                    </select>
                                </div>
                            </div>
                        </div>
                        <div class="layui-col-md6">
                            <div class="layui-form-item">
                                <label class="layui-form-label must">生日</label>
                                <div class="layui-input-block">
                                    <input type="text" name="birthday" id="birthday" placeholder="请输入出生年月日"
                                           autocomplete="off"
                                           readonly="readonly" class="layui-input" lay-verify="required ">
                                </div>
                            </div>
                        </div>
                    </div>

                    <div class="layui-row">
                        <div class="layui-col-md6">
                            <div class="layui-form-item">
                                <label class="layui-form-label">民族</label>
                                <div class="layui-input-block">
                                    <input type="text" name="nation" placeholder="请输入民族" autocomplete="off"
                                           class="layui-input">
                                </div>
                            </div>
                        </div>
                        <div class="layui-col-md6">
                            <div class="layui-form-item">
                                <label class="layui-form-label">婚姻状况</label>
                                <div class="layui-input-block">
                                    <select name="maritalStatus">
                                        <option value="0">未婚</option>
                                        <option value="1">已婚</option>
                                    </select>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="layui-row">
                        <div class="layui-col-md6">
                            <div class="layui-form-item">
                                <label class="layui-form-label">政治面貌</label>
                                <div class="layui-input-block">
                                    <select name="politicsStatus">
                                        <option value="0">群众</option>
                                        <option value="1">中共党员</option>
                                        <option value="2">中共预备党员</option>
                                        <option value="3">共青团员</option>
                                        <option value="4">民革党员</option>
                                        <option value="5">民盟盟员</option>
                                        <option value="6">民建会员</option>
                                        <option value="7">民进会员</option>
                                        <option value="8">农工党党员</option>
                                        <option value="9">致公党党员</option>
                                        <option value="10">九三学社社员</option>
                                        <option value="11">无党派人士</option>
                                        <option value="12">台盟盟员</option>
                                    </select>
                                </div>
                            </div>
                        </div>
                        <div class="layui-col-md6">
                            <div class="layui-form-item">
                                <label class="layui-form-label">文化程度</label>
                                <div class="layui-input-block">
                                    <select name="culture">
                                        <option value="0">研究生</option>
                                        <option value="1">博士</option>
                                        <option value="2">大学本科</option>
                                        <option value="3">大学专科</option>
                                        <option value="4">中等专业学校</option>
                                        <option value="5">技工学校</option>
                                        <option value="6">高中</option>
                                        <option value="7">初中</option>
                                        <option value="8">小学</option>
                                        <option value="9">文盲</option>
                                        <option value="10">半文盲</option>
                                    </select>
                                </div>
                            </div>
                        </div>
                    </div>

                    <div class="layui-row">
                        <div class="layui-col-md6">
                            <div class="layui-form-item">
                                <label class="layui-form-label must">联系电话</label>
                                <div class="layui-input-block">
                                    <input type="text" name="contactPhone" lay-verify="phone" placeholder="请输入联系电话"
                                           autocomplete="off" class="layui-input">
                                </div>
                            </div>
                        </div>
                        <div class="layui-col-md6">
                            <div class="layui-form-item">
                                <label class="layui-form-label ">紧急联系人电话</label>
                                <div class="layui-input-block">
                                    <input type="text" name="urgencyContactPhone"
                                           placeholder="请输入紧急联系人电话" autocomplete="off" class="layui-input">
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="layui-col-md3" style="padding-left:10px;">
                    <div style="width: 150px;height: 174px;background: floralwhite;text-align: center;line-height: 174px;">
                        <img src="/static/imgs/txsc.png" alt="头像" id="avatarimg" style="cursor: pointer;">
                        <input type="hidden" id="avatar" name="avatar">
                    </div>
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label">暂住地址</label>
                <div class="layui-input-block">
                    <input type="text" name="temporaryAddress" required placeholder="请输入暂住地址" autocomplete="off"
                           class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">家庭地址</label>
                <div class="layui-input-block">
                    <input type="text" name="homeAddress" placeholder="请输入家庭地址" autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label must ">所属部门</label>
                    <div class="layui-input-block">
                        <select name="departmentId" disabled="disabled">
                            <option th:value="${department.id}" th:text="${department.name}"></option>
                        </select>
                        <input type="hidden" name="departmentName" th:value="${department.name}" id="departmentName">
                    </div>
                </div>
                <div class="layui-inline">
                    <div class="layui-form-item">
                        <label class="layui-form-label must">岗位</label>
                        <div class="layui-input-block">
                            <select name="type" lay-verify="required" lay-filter="post">
                                <option value=""></option>
                                <option value="1">医生</option>
                                <option value="2">护士</option>
                                <option value="4">护工</option>
                                <option value="6">消防</option>
                                <option th:each="post: ${posts}" th:value="${post.id}" th:text="${post.name}"></option>
                            </select>
                            <input type="hidden" name="postName" id="postName">
                        </div>
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">职称级别</label>
                <div class="layui-input-block">
                    <select name="jobTitle" lay-filter="type">
                        <option value="0">无</option>
                        <option value="1">一级护理</option>
                        <option value="2">二级护理</option>
                        <option value="3">三级护理</option>
                        <option value="4">特级护理</option>
                        <option value="5">初级医师</option>
                        <option value="6">中级医师</option>
                        <option value="7">副高级医师</option>
                        <option value="8">正高级医师</option>
                        <option value="9">初级护士</option>
                        <option value="10">初级护师</option>
                        <option value="11">主管护师</option>
                        <option value="12">主任护师</option>
                        <option value="13">初级建(构)筑物消防员</option>
                        <option value="14">中级建(构)筑物消防员</option>
                        <option value="15">高级建(构)筑物消防员</option>
                        <option value="16">建(构)筑物消防技师</option>
                        <option value="17">建(构)筑物消防高级技师</option>
                    </select>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label">身份证附件</label>
                    <div class="layui-input-block">
                        <div style="position: relative;margin-left:10px;width: 200px;height: 150px;background: floralwhite;text-align: center;line-height: 174px;">
                            <img src="/static/imgs/sfzz.png" alt="身份证正面" id="identityCardJust"
                                 style="cursor: pointer;height: 160px;width: 200px;">
                            <input type="hidden" name="identityCardJust" class="identityCardJust">
                        </div>
                    </div>
                </div>
                <div class="layui-inline">
                    <div class="layui-input-block">
                        <div style="position: relative;margin-left:10px;width: 200px;height: 150px;background: floralwhite;text-align: center;line-height: 174px;">
                            <img src="/static/imgs/sfzf.png" alt="身份证反面" id="identityCardAgainst"
                                 style="cursor: pointer;height: 160px;width: 200px">
                            <input type="hidden" name="identityCardAgainst" class="identityCardAgainst">
                        </div>
                    </div>
                </div>
            </div>
            <div class="layui-form-item" id="uploadLaborContract">
                <label class="layui-form-label ">劳动合同</label>
                <div class="layui-input-block">
                    <div class="layui-upload layui-inline" id="laborContracts">
                        <div class="layui-upload-list">
                            <img  style="height: 150px;width: 110px" class="layui-upload-img" src="/static/imgs/imgup.png" id="laborContract1">
                             <p class="msg-box" style="visibility: hidden">
                                 <button type="button" class="layui-btn layui-btn-danger  layui-btn-xs deleteLaborContract">删除</button>
                              </p>
                        </div>
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label ">证书信息</label>
                <div class="layui-input-block" style="line-height: 36px;">
                    <a href="javascript:void(0)" id="certificateAdd" class="layui-btn layui-btn-normal layui-btn-xs">添加证书</a>
                </div>
                <table class="layui-table" lay-size="sm">
                    <colgroup>
                        <col width="150">
                        <col width="200">
                        <col>
                    </colgroup>
                    <thead>
                    <tr>
                        <th>证书名称</th>
                        <th>证书图片</th>
                        <th width="20px">操作</th>
                    </tr>
                    </thead>
                    <tbody id="tbody">
                    </tbody>
                </table>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label ">培训记录</label>
                <div class="layui-input-block" style="line-height: 36px;">
                    <a href="javascript:void(0)" id="trainAdd" class="layui-btn layui-btn-normal layui-btn-xs">添加培训记录</a>
                </div>
                <table class="layui-table" lay-size="sm">
                    <colgroup>
                        <col width="150">
                        <col width="200">
                        <col>
                    </colgroup>
                    <thead>
                    <tr>
                        <th>培训名称</th>
                        <th>培训时间</th>
                        <th>培训单位</th>
                        <th>培训成绩</th>
                        <th>培训证明</th>
                        <th width="99px">操作</th>
                    </tr>
                    </thead>
                    <tbody id="tbody1">

                    </tbody>
                </table>
            </div>
            <div class="layui-col-lg5">
                <div class="layui-form-item">
                    <div class="layui-input-block">
                        <button class="layui-btn  layui-btn-normal" lay-submit lay-filter="submitBtn">保存</button>
                        <a href="/employee" class="layui-btn layui-btn-primary">返回</a>
                    </div>
                </div>
            </div>
        </form>
    </div>
</div>
</html>